Deal with different encodings of Cargo.lock
authorAlex Crichton <alex@alexcrichton.com>
Mon, 4 Aug 2014 01:38:25 +0000 (18:38 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 4 Aug 2014 01:38:25 +0000 (18:38 -0700)
commit1b957d41fb2289ca256c1716e8fac2c330f46f1a
treece8d85c256b007a73259cb29f76e56a090487e26
parent8c6e1a3568cba91a92d4cbc7555d52645eb23cd4
Deal with different encodings of Cargo.lock

On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
src/cargo/core/resolver.rs
src/cargo/ops/cargo_generate_lockfile.rs
src/cargo/util/graph.rs
tests/test_cargo_generate_lockfile.rs [new file with mode: 0644]
tests/tests.rs